<?php
$tel = '13014577033';
$url = "https://www.ip138.com/mobile.asp?mobile={$tel}&action=mobile";
//$html = str_replace("\n", "", file_get_contents($url));
//打开查询结果网页内容
$html = file_get_contents($url);
//echo $html, "<br>";
$pattern = '/<div class="table">(.*?)<\/div>/is';  ///i 忽略大小写/s 将字符串视为单行,换行符作为普通字符;
$result = preg_match_all($pattern, $html, $ok);
echo $ok[0][0];